<layout name="layout"/>
<div class="warp1 mt">
    <div id="ggao"><b>最新公告：</b><span>
        <foreach name="lists" item="brr">
        <marquee>{$brr['title']}</marquee>
        </foreach></span></div>
</div>
<div class="clear"></div>

</div>

<div class="content">
    <div class="warp1 mt">
        <h3 class="nybt"><span>留言本</span></h3>
        <div class="form">
            <form method='post' id="form_do" name="form_do" action="{:U('message/add')}">
                <dl>
                    <dt>姓名：</dt>
                    <dd>
                        <input type="text" name="username" class="inp_one" />
                    </dd>
                </dl>
                <dl>
                    <dt> 电话：</dt>
                    <dd>
                        <input type="text" name="tel" class="inp_one"/>
                    </dd>
                </dl>
                <dl>
                    <dt>Email：</dt>
                    <dd>
                        <input type="text" name="email" class="inp_one" />
                    </dd>
                </dl>
                <dl>
                    <dt>QQ：</dt>
                    <dd>
                        <input type="text" name="qq" class="inp_one" />
                    </dd>
                </dl>
                <dl>
                    <dt>留言：</dt>
                    <dd>
                        <textarea name="content" cols="50" rows="10"></textarea>
                    </dd>
                </dl>

                <dl>
                    <dt>验证码</dt>
                    <dd>
                        <input type="text" name="vcode" class="inp_small" /><img src="{:U("Message/code")}" id="VCode" class="yzm" onclick="javascript:changeVcode(this);" />
                    </dd>
                </dl>		<div class="form_b">
                <input type="submit" class="btn_blue" id="submit" value="提 交">
                <input type="hidden" id="posttime" name="posttime" value="<?=time()?>">
                <input type="hidden" id="ip" name="ip" value="<?=$_SERVER['SERVER_ADDR']?>" >
            </div>
            </form>
        </div>
        <div class=" clear"></div>
    </div>


    <div class="warp1 mt">
        <h3 class="nybt"><span>留言列表</span></h3>
    </div>
    <foreach name="list" item="arr">
    <div class="guestbook_title">{$arr['username']} {$arr['posttime']|date='Y-m-d H:i:s',###}</div>

        <div class="guestbook_msg">
            {$arr['content']}
            <?php if(isset($arr['reply'])){  ?>
            <div class="guestbook_reply">
            <strong>回复：</strong>{$arr['reply']} {$arr['replytime']|date='Y-m-d H:i:s',###}</div>
            <?php } ?>
        </div>    <!--分页 -->
    </foreach>
        <div class="scott mt"><div>     </div>
            <div class="clear"></div>
        </div>

    </div>
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script>
        $(function(){

            $('.yzm').click(function(){
                this.src = this.src+'?r='+Math.random();

            })

        })


    </script>




</div>
